package book;

public class BookList {
    private Book[] books = new Book[100];
    private int bookNum = 3;

    public BookList() {
        this.books[0] = new Book("唐人街探案","林墨",10,"小说");
        this.books[1] = new Book("不疯狂英语","学不会英语",19,"英语");
        this.books[2] = new Book("不疯狂编程","秃头仔",10,"编程");
        this.bookNum = 3;
    }

    public Book getBook(int pos) {
        return books[pos];
    }
    public void setBook(Book book,int pos) {
        this.books[pos] = book;
    }
    public int getBookNum() {
        return bookNum;
    }
    public void setBookNum(int bookNum) {
        this.bookNum = bookNum;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }

    public Book[] getBooks() {
        return books;
    }
}
